package com.hsgene.product.persistence;

import com.hsgene.product.condition.CommentCondition;
import com.hsgene.product.domain.GeneticComment;
import com.hsgene.product.dto.GeneticCommentDto;
import com.hsgene.product.dto.GeneticCommentPageDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GeneticCommentMapper {
    int deleteByPrimaryKey(String id);

    int insert(GeneticComment record);

    int insertSelective(GeneticComment record);

    GeneticComment selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(GeneticComment record);

    int updateByPrimaryKey(GeneticComment record);

    /**
     * 获取详情
     * @param id
     * @return
     */
    GeneticComment getCommentAndPackageById(String id);

    /**
     * 根据条件查询评价数量
     * @param condition 查询条件
     * @return
     */
    int commentCount(@Param("condition") CommentCondition condition);

    /**
     * 根据条件查询评价列表
     * @param condition 查询条件
     * @return
     */
    List<GeneticCommentPageDto> comments(@Param("condition") CommentCondition condition);
}